<?php
include("connection/connection.php");
if(isset($_POST['delete']))
{
$asset_id=$_POST['asset_id'];
$loc_id=$_POST['loc_id'];
$qr="delete from tbl_dtls_q1_asset where id='$asset_id'";
$res=mysql_query($qr);
if($res)
{
$update_query="update tbl_dtls_q1_main set sub_total=(sub_total-1) where id='$loc_id'";
$res=mysql_query($update_query);
header("location:q1_rwss_edit.php");
}
}		
?>